precision mediump float;
varying vec2 v_uv;
uniform sampler2D u_s_texture;
uniform sampler2D u_displ_tex;
uniform vec4 u_color;

void main()
{
	vec2 disp = texture2D(Displ_tex, vec2(Tex_coords_original.u, Tex_coords_original.v + u_Time)).rg;
	float dMax;
	vec2 offset = (2.0 * disp - 1.0) * dMax;
	vec2 Tex_coords_displaced = Tex_coords_original + offset;
	vec4 fire_color = texture2D (u_s_texture, Tex_coords_displaced);
	vec4 AlphaValue = texture2D(FireMask, Tex_coords_original);
	gl_FragColor = fire_color * (1.0, 1.0, 1.0, AlphaValue.r);
}
